package com.ben.notebook.infrastructure.util;

/**
 * 自定义业务异常类
 * @date 2020-12-12
 */
public class BusinessRuntimeException extends RuntimeException{

    private final String message;

    public BusinessRuntimeException(ErrorMsgEnum errorMsgEnum) {
        super(errorMsgEnum.getErrorMsg());
        this.message = errorMsgEnum.getErrorMsg();
    }

    @Override
    public String getMessage() {
        return message;
    }
}
